﻿Imports omen02

Public Class InsertarServicio


    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Me.Close()
        Me.Visible = False
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

        'Ingresar los datos a la base de datos
        Dim x = Me.idusuarioregistrarservicio.Text

        Dim y = Me.idventaregistrarservicio.Text

        Dim z = Me.descripcionregistrarservicio.Text

        Dim n = New ServicioNegocio()


        Dim paquete = n.insertar(x, y, z)

        MsgBox("Servicio registrado!!!!")

        'Limpiar cajitas de texto desues de ingresar datos
        idusuarioregistrarservicio.Clear()
        idventaregistrarservicio.Clear()
        descripcionregistrarservicio.Clear()

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim neg As New ServicioNegocio
        Dim servicios As Collection = neg.listar

        Me.dgvpaquete.DataSource = servicios
        Me.dgvpaquete.EditMode = False

        Me.dgvpaquete.Columns(0).HeaderText = "idPaquete"
        Me.dgvpaquete.Columns(1).HeaderText = "idUsuario"
        Me.dgvpaquete.Columns(2).HeaderText = "idVenta"
        Me.dgvpaquete.Columns(3).HeaderText = "descripcion"

    End Sub

    Private Sub dgvservicio_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvpaquete.CellContentClick

    End Sub

    Private Sub InsertarServicio_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class